<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">
    <title>寻医问药</title>
    <!-- Bootstrap core CSS -->
    <link href="{{asset('/layui.css')}}" rel="stylesheet" media="all">
    <link rel="stylesheet" href="{{asset('/bootstrap.min.css')}}">
    <link rel="stylesheet" href="{{asset('/dashboard.css')}}">
    <link rel="stylesheet" href="{{asset('/bootstrap-theme.min.css')}}">
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="{{asset('/layui.js')}}" charset="utf-8"></script>
    <script src="{{asset('/jquery.js')}}"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="{{asset('/bootstrap.min.js')}}"></script>
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">寻医问药</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">寻医问药</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav navbar-right">
                <li><a href="javascript:;">{{session("business_name")}}，欢迎您</a></li>
                <li><a href="/businessLogout" style="color: red">退出</a></li>
            </ul>
        </div>
    </div>
</nav>
<div class="container-fluid">
    <div class="row">
        @extends('business.leftNav')
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
            <h2 class="page-header">收到订单</h2>
            @if(session('__Ajax_RedirectFunc_status') == true)
                <div>
                    <div class="alert alert-success alert-dismissible fade in" role="alert">
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                        <h3>成功</h3>
                        <p><?php echo session('__Ajax_RedirectFunc_message');?></p>
                        <p><?php echo session('__Ajax_RedirectFunc_plugin');?></p>
                    </div>
                </div>
            @endif
            @if(session('__Ajax_RedirectFunc_status') === false)
                <div >
                    <div class="alert alert-danger alert-dismissible fade in" role="alert">
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                        <h3>失败</h3>
                        <p><?php echo session('__Ajax_RedirectFunc_message');?></p>
                        <p><?php echo session('__Ajax_RedirectFunc_plugin');?></p>
                    </div>
                </div>
            @endif
            <div class="panel-body" >
                <table class="table table-responsive table-condensed table-hover table-striped">
                    <thead>
                    <tr>
                        <th>下单时间</th>
                        <th>商品名称</th>
                        <th>预定客户</th>
                        <th>联系方式</th>
                        <th>订单状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    @foreach($orderData as $data)
                        <tr>
                            <td>{{$data->re_user_drug_time}}</td>
                            <td>{{$data->drug_name}}</td>
                            <td>{{$data->user_name}}</td>
                            <td>{{$data->user_phone}}</td>
                            <td>{{$data->status_name}}</td>
                            <td>
                                @if($data->status_id == 1)
                                <a href="/sendOrder/{{$data->drug_id}}" type="button" class="btn btn-success btn-sm">配货完成</a>
                                @endif
                                @if($data->status_id == 2)
                                <a href="/end/{{$data->drug_id}}" type="button" class="btn btn-success btn-sm">订单完成</a>
                                @endif
                                @if($data->status_id == 3)
                                    无
                                @endif
                            </td>
                        </tr>
                    @endforeach
                    </tbody>
                </table>
                <ul class="list text-center">

                </ul>
            </div>
        </div>
    </div>
</div>
</body>
</html>